
<%@ page language="java" import="com.fredck.FCKeditor.*" pageEncoding="UTF-8"%>


<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    
    <title>My JSP 'MyJsp.jsp' starting page</title>
    <script type="text/javascript" src="fckeditor.js"></script>
    <!--
    <link rel="stylesheet" type="text/css" href="styles.css">
    -->
  </head>
  <body>
    This is my JSP page. <br>
    <A href="../../MyJsp.jsp">TestJSP</A>
    <A href="../../MyJsp2.jsp">TestJSP2</A>
    <form  method="get" target="_blank">
		<script type="text/javascript">
<!--
// Automatically calculates the editor base path based on the _samples directory.
// This is usefull only for these samples. A real application should use something like this:
// oFCKeditor.BasePath = '/fckeditor/' ;	// '/fckeditor/' is the default value.
var sBasePath = "<%=path%>"+"/components/FCKeditor/";
//document.location.pathname.substring(0,document.location.pathname.lastIndexOf('FCKeditor')) ;
alert(sBasePath);
var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;
oFCKeditor.BasePath	= sBasePath ;
oFCKeditor.Height	= 300 ;
oFCKeditor.Value	= 'This is some <strong>sample text<\/strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor<\/a>.' ;
oFCKeditor.Create() ;
//-->
		</script>
	</form>
  </body>
</html>
